<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>English Potential Assessment - Set Goals</title>
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
    <style>
      body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        background-color: #fff;
        color: #333;
      }

      .dark body {
        background-color: #1a1a1a;
        color: #f5f5f5;
      }

      /* 进度条样式 */
      .progress-container {
        height: 4px;
        width: 100%;
        background-color: #f0f0f0;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
      }

      .progress-bar {
        height: 100%;
        background-color: #007aff;
        width: 75%; /* 进度条位置 */
      }

      .dark .progress-container {
        background-color: #333;
      }

      /* 顶部导航 */
      .top-nav {
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .back-btn {
        color: #007aff;
        font-size: 1.25rem;
        cursor: pointer;
      }

      /* 内容区域 */
      .content {
        max-width: 500px;
        height: 90vh;
        margin: 0 auto;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
      }

      /* 引言卡片 */
      .quote-card {
        border: 1px solid #96c4f5;
        border-radius: 16px;
        padding: 1.5rem 3rem;
        margin: 1rem 0 1.5rem;
        text-align: center;
        position: relative;
      }

      .dark .quote-card {
        border-color: #4a5568;
        background-color: #2d3748;
      }

      .pause-icon {
        color: #3ba0ff;
        margin-bottom: 0.8rem;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .dark .pause-icon {
        color: #0a84ff;
      }

      .quote-text {
        font-size: 1.3rem;
        font-weight: 600;
        margin-bottom: 0.8rem;
        line-height: 1.4;
        color: #0b4983;
      }

      .dark .quote-text {
        color: #f3f4f6;
      }

      .quote-author {
        font-size: 1rem;
        color: #0b4983;
        text-align: center;
        padding-right: 0.5rem;
      }

      .dark .quote-author {
        color: #9ca3af;
      }

      /* 图片样式 */
      .goal-image {
        width: 75%;
        max-width: 320px;
        margin: 0 auto 1.5rem;
        display: block;
      }

      /* 按钮样式 */
      .btn-primary {
        background-color: #007aff;
        color: white;
        padding: 0.75rem 1.5rem;
        border-radius: 10px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        width: 100%;
        justify-content: center;
        border: none;
        font-size: 1.2rem;
        margin-bottom: 3rem;
        height: 50px;
      }

      .btn-primary:hover {
        background-color: #0062cc;
      }

      .btn-primary:disabled {
        background-color: #c7c7cc;
        cursor: not-allowed;
      }

      /* 主题切换按钮 */
      .theme-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: #007aff;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
      }

      .theme-toggle:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
      }

      /* 页面标题 */
      .page-title {
        font-size: 2rem;
        font-weight: 700;
        color: #3ba0ff;
        text-align: center;
        margin: 1.5rem 0;
      }

      .dark .page-title {
        color: #3ba0ff;
      }

      .nav-progress-container {
        display: flex;
        align-items: center;
        margin-bottom: 40px;
        gap: 15px;
      }

      .back-button {
        width: 30px;
        height: 30px;
        border: none;
        background: none;
        cursor: pointer;
        color: #2b85e4;
        font-size: 20px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .back-button svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
      }

      .progress-bar {
        flex: 1;
        height: 6px;
        background-color: #e0e0e0;
        border-radius: 3px;
      }

      .progress {
        height: 100%;
        width: 26.64%;
        background-color: #2b85e4;
        border-radius: 3px;
      }
    </style>
    <script>
      // 检查深色模式
      function checkDarkMode() {
        if (
          localStorage.getItem('darkMode') === 'true' ||
          (localStorage.getItem('darkMode') === null && window.matchMedia('(prefers-color-scheme: dark)').matches)
        ) {
          document.documentElement.classList.add('dark')
          return true
        }
        return false
      }

      // 切换深色/浅色模式
      function toggleDarkMode() {
        if (document.documentElement.classList.contains('dark')) {
          document.documentElement.classList.remove('dark')
          localStorage.setItem('darkMode', 'false')
          document.getElementById('theme-icon').className = 'fas fa-moon'
        } else {
          document.documentElement.classList.add('dark')
          localStorage.setItem('darkMode', 'true')
          document.getElementById('theme-icon').className = 'fas fa-sun'
        }
      }

      // 页面加载时检查深色模式
      document.addEventListener('DOMContentLoaded', function () {
        const isDark = checkDarkMode()
        document.getElementById('theme-icon').className = isDark ? 'fas fa-sun' : 'fas fa-moon'

        // 继续按钮点击事件
        document.getElementById('continue-btn').addEventListener('click', function () {
          // 跳转到下一页
          window.location.href = 'whenWas.html'
        })

        // 返回按钮点击事件
        document.querySelector('.back-btn').addEventListener('click', function () {
          window.history.back()
        })
      })
    </script>
  </head>
  <body>
    <div class="content">
      <div>
        <div class="nav-progress-container">
          <button class="back-button" onclick="window.location.href='/whatLevel.html'">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
              <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" />
            </svg>
          </button>
          <div class="progress-bar">
            <div class="progress"></div>
          </div>
        </div>
        <!-- 标题 -->
        <h1 class="page-title">Set your own goal!</h1>

        <!-- 引言卡片 -->
        <div class="quote-card">
          <div class="pause-icon">&#9616;&#9616;</div>
          <p class="quote-text">Discipline is the bridge between goals and accomplishment.</p>
          <p class="quote-author">- Jim Rohn</p>
          <img src="./imgs/goal.png" alt="Goal stairs with trophies" />
        </div>
      </div>

      <!-- 继续按钮 -->
      <button id="continue-btn" class="btn-primary">Continue</button>
    </div>

    <!-- 主题切换按钮 -->
    <div class="theme-toggle" onclick="toggleDarkMode()">
      <i id="theme-icon" class="fas fa-moon"></i>
    </div>
  </body>
</html>
